using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._SpatialAnalystTools._Hydrology
{
    /// <summary>
    /// <para>Flow Accumulation</para>
    /// <para>Creates a raster of accumulated flow into each cell. A weight factor can optionally be applied.</para>
    /// <para>创建流入每个像元的累积流量栅格。可以选择应用权重系数。</para>
    /// </summary>    
    [DisplayName("Flow Accumulation")]
    public class FlowAccumulation : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public FlowAccumulation()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_flow_direction_raster">
        /// <para>Input flow direction raster</para>
        /// <para><xdoc>
        ///   <para>The input raster that shows the direction of flow out of each cell.</para>
        ///   <para>The flow direction raster can be created using the Flow Direction tool.</para>
        ///   <para>The flow direction raster can be created using the D8, Multiple Flow Direction (MFD), or D-Infinity method. Use the Input flow direction type parameter to specify the method used when the flow direction raster was created.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>显示流出每个像元的方向的输入栅格。</para>
        ///   <para>可以使用流向工具创建流向栅格。</para>
        ///   <para>可以使用 D8、多流向 （MFD） 或 D-Infinity 方法创建流向栅格。使用输入流向类型参数指定创建流向栅格时使用的方法。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_accumulation_raster">
        /// <para>Output accumulation raster</para>
        /// <para>The output raster that shows the accumulated flow to each cell.</para>
        /// <para>显示流向每个像元的累积流量的输出栅格。</para>
        /// </param>
        public FlowAccumulation(object _in_flow_direction_raster, object _out_accumulation_raster)
        {
            this._in_flow_direction_raster = _in_flow_direction_raster;
            this._out_accumulation_raster = _out_accumulation_raster;
        }
        public override string ToolboxName => "Spatial Analyst Tools";

        public override string ToolName => "Flow Accumulation";

        public override string CallName => "sa.FlowAccumulation";

        public override List<string> AcceptEnvironments => ["autoCommit", "cellSize", "cellSizeProjectionMethod", "compression", "configKeyword", "extent", "geographicTransformations", "mask", "outputCoordinateSystem", "parallelProcessingFactor", "scratchWorkspace", "snapRaster", "tileSize", "workspace"];

        public override object[] ParameterInfo => [_in_flow_direction_raster, _out_accumulation_raster, _in_weight_raster, _data_type.GetGPValue(), _flow_direction_type.GetGPValue()];

        /// <summary>
        /// <para>Input flow direction raster</para>
        /// <para><xdoc>
        ///   <para>The input raster that shows the direction of flow out of each cell.</para>
        ///   <para>The flow direction raster can be created using the Flow Direction tool.</para>
        ///   <para>The flow direction raster can be created using the D8, Multiple Flow Direction (MFD), or D-Infinity method. Use the Input flow direction type parameter to specify the method used when the flow direction raster was created.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>显示流出每个像元的方向的输入栅格。</para>
        ///   <para>可以使用流向工具创建流向栅格。</para>
        ///   <para>可以使用 D8、多流向 （MFD） 或 D-Infinity 方法创建流向栅格。使用输入流向类型参数指定创建流向栅格时使用的方法。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input flow direction raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_flow_direction_raster { get; set; }


        /// <summary>
        /// <para>Output accumulation raster</para>
        /// <para>The output raster that shows the accumulated flow to each cell.</para>
        /// <para>显示流向每个像元的累积流量的输出栅格。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output accumulation raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_accumulation_raster { get; set; }


        /// <summary>
        /// <para>Input weight raster</para>
        /// <para><xdoc>
        ///   <para>An optional input raster for applying a weight to each cell.</para>
        ///   <para>If no weight raster is specified, a default weight of 1 will be applied to each cell. For each cell in the output raster, the result will be the number of cells that flow into it.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用于对每个像元应用权重的可选输入栅格。</para>
        ///   <para>如果未指定权重栅格，则默认权重 1 将应用于每个像元。对于输出栅格中的每个像元，结果将是流入其中的像元数。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input weight raster")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _in_weight_raster { get; set; } = null;


        /// <summary>
        /// <para>Output data type</para>
        /// <para><xdoc>
        ///   <para>The output accumulation raster can be integer, floating point, or double type.</para>
        ///   <bulletList>
        ///     <bullet_item>Float—The output raster will be floating point type. This is the default.</bullet_item><para/>
        ///     <bullet_item>Integer—The output raster will be integer type.</bullet_item><para/>
        ///     <bullet_item>Double—The output raster will be double type.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出累积栅格可以是整数、浮点或双精度类型。</para>
        ///   <bulletList>
        ///     <bullet_item>浮点型—输出栅格将为浮点型。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>整数—输出栅格将为整数类型。</bullet_item><para/>
        ///     <bullet_item>双精度—输出栅格将为双精度类型。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output data type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _data_type_value _data_type { get; set; } = _data_type_value._FLOAT;

        public enum _data_type_value
        {
            /// <summary>
            /// <para>Float</para>
            /// <para>Float—The output raster will be floating point type. This is the default.</para>
            /// <para>浮点型—输出栅格将为浮点型。这是默认设置。</para>
            /// </summary>
            [Description("Float")]
            [GPEnumValue("FLOAT")]
            _FLOAT,

            /// <summary>
            /// <para>Integer</para>
            /// <para>Integer—The output raster will be integer type.</para>
            /// <para>整数—输出栅格将为整数类型。</para>
            /// </summary>
            [Description("Integer")]
            [GPEnumValue("INTEGER")]
            _INTEGER,

            /// <summary>
            /// <para>Double</para>
            /// <para>Double—The output raster will be double type.</para>
            /// <para>双精度—输出栅格将为双精度类型。</para>
            /// </summary>
            [Description("Double")]
            [GPEnumValue("DOUBLE")]
            _DOUBLE,

        }

        /// <summary>
        /// <para>Input flow direction type</para>
        /// <para><xdoc>
        ///   <para>Specifies the input flow direction raster type.</para>
        ///   <bulletList>
        ///     <bullet_item>D8—The input flow direction raster is of type D8. This is the default.</bullet_item><para/>
        ///     <bullet_item>MFD—The input flow direction raster is of type Multi Flow Direction (MFD).</bullet_item><para/>
        ///     <bullet_item>DINF—The input flow direction raster is of type D-Infinity (DINF).</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定输入流向栅格类型。</para>
        ///   <bulletList>
        ///     <bullet_item>D8 - 输入流向栅格的类型为 D8。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>MFD—输入流向栅格的类型为多流向 （MFD）。</bullet_item><para/>
        ///     <bullet_item>DINF—输入流向栅格的类型为 D-Infinity （DINF）。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input flow direction type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _flow_direction_type_value _flow_direction_type { get; set; } = _flow_direction_type_value._D8;

        public enum _flow_direction_type_value
        {
            /// <summary>
            /// <para>D8</para>
            /// <para>D8—The input flow direction raster is of type D8. This is the default.</para>
            /// <para>D8 - 输入流向栅格的类型为 D8。这是默认设置。</para>
            /// </summary>
            [Description("D8")]
            [GPEnumValue("D8")]
            _D8,

            /// <summary>
            /// <para>DINF</para>
            /// <para>DINF—The input flow direction raster is of type D-Infinity (DINF).</para>
            /// <para>DINF—输入流向栅格的类型为 D-Infinity （DINF）。</para>
            /// </summary>
            [Description("DINF")]
            [GPEnumValue("DINF")]
            _DINF,

        }

        public FlowAccumulation SetEnv(int? autoCommit = null, object cellSize = null, object compression = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object mask = null, object outputCoordinateSystem = null, object parallelProcessingFactor = null, object scratchWorkspace = null, object snapRaster = null, double[] tileSize = null, object workspace = null)
        {
            base.SetEnv(autoCommit: autoCommit, cellSize: cellSize, compression: compression, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, mask: mask, outputCoordinateSystem: outputCoordinateSystem, parallelProcessingFactor: parallelProcessingFactor, scratchWorkspace: scratchWorkspace, snapRaster: snapRaster, tileSize: tileSize, workspace: workspace);
            return this;
        }

    }

}